<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/commons/pages/taglibs.jsp" %>
<c:set var="app_name" value="器件平台管理系统" />
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>用户登录 - ${app_name}</title>
<link rel="stylesheet" type="text/css" href="./jquery-easyui/themes/${themes}/easyui.css">
<link rel="stylesheet" type="text/css" href="./jquery-easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="./styles/demo.css">
<script type="text/javascript" src="./jquery-easyui/jquery.min.js"></script>
<script type="text/javascript" src="./jquery-easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="./jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="./scripts/public.js.jsp"></script>
</head>
<body>
<div id="win" style="display:none;">
  <div style="padding:40px 0px;">
    <form method="post" id="fm" novalidate>
      <table style="width:360px;">
        <tr>
          <td width="120" align="right"><b>工号或邮箱：</b></td>
          <td width="220"><input name="username" id="username" type="text" class="easyui-validatebox" style="width:160px;" placeholder="请输入工号或邮箱..." value="part@ligoo.cn" data-options="required:true" /></td>
        </tr>
        <tr>
          <td align="right"><b>密码：</b></td>
          <td><input name="password" id="password" type="password" class="easyui-validatebox" style="width:160px;" placeholder="请输入密码..." data-options="required:true" /></td>
        </tr>
      </table>
    </form>
  </div>
  <div style="text-align:center;"> <a href="#" id="link_submit" class="easyui-linkbutton" data-options="iconCls:'icon-redo'" onclick="doSave({url:'${ctx}/login', oper:'login-redirect'});">登录</a> <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload'" onclick="$('#fm').form('clear');">重置</a></div>
</div>
<div class="datagrid-mask"></div>
<div class="datagrid-mask-msg">
  <div style="font-weight:bold; color:red;">对不起，您使用的浏览器版本太低（Internet Explorer <span id="browser_version"></span>），访问系统会存在速度和兼容性的问题！</div>
  <div style="font-weight:bold; color:green;">我们推荐您使用最新版的 Chrome、Firefox、或 IE9 及以上版本的浏览器。</div>
  <div><a href="http://www.google.cn/chrome/intl/zh-CN/landing_chrome.html" target="_blank">下载 Chrome 浏览器</a></div>
  <div><a href="http://firefox.com.cn/" target="_blank">下载 Firefox 火狐浏览器</a> </div>
  <div><a href="http://windows.microsoft.com/zh-CN/internet-explorer/products/ie/home/" target="_blank">下载 Internet Explorer 9 浏览器</a> </div>
</div>
<script type="text/javascript">
$(function(){
	if(self != top){
		top.location = self.location;
	}
	$('#password').keydown(function(e) {
	    if (e.which == 13){
	        $("#link_submit").click();
	    }
	});
	
// 	$.browser.msie = /msie/.test(navigator.userAgent.toLowerCase());
// 	var lameIE = $.browser.msie && $.browser.version < 9;
// 	if (lameIE) {
// 		$('#browser_version').html($.browser.version);
		
// 		var $mask = $('.datagrid-mask');
// 		var $mask_msg = $('.datagrid-mask-msg');
		
// 		$mask.css({
// 			display: 'block',
// 			width: $(window).width(),
// 			height: $(window).height()
// 		}).appendTo(document.body);
		
// 		$mask_msg.css({
// 			display: 'block',
// 			'z-index': 9999,
// 			width: 560,
// 			height: 90,
// 			padding: '10px 10px 10px 60px',
// 			background: '#ffc url("${ctx}/jquery-easyui/themes/default/images/messager_warning.gif") no-repeat scroll 10px 10px',
// 			left: ($(window).width()  - $mask_msg.outerWidth())/2,
// 			top:  ($(window).height() - $mask_msg.outerHeight())/2
// 		});

// 		$(window).resize(function() {
// 			$mask.css({
// 				width:  $(window).width(), 
// 				height: $(window).height()
// 			});
// 			$mask_msg.css({
// 				left: ($(window).width()  - $mask_msg.outerWidth())/2,
// 				top:  ($(window).height() - $mask_msg.outerHeight())/2
// 			});
// 		}).resize();
// 	} else {
		var $win = $('#win').window({
			title: '${app_name}',
			width: 400,
			height: 240,
			modal: false,
			shadow: true,
			resizable: false,
			collapsible: false,
			minimizable: false,
			maximizable: false,
			closable: false,
			iconCls: 'iconx iconx-config'
		}).show();
		
		$(window).resize(function() {
			$win.window({
				left: ($(document.body).width() - $win.window('options').width) / 2,
				top:  ($(window).height() - $win.window('options').height) / 2
			});
		}).resize();
//	}
});
</script>
</body>
</html>